package javango.forms.widgets;

import com.google.inject.Inject;
import com.google.inject.Injector;

public class WidgetFactoryImpl implements WidgetFactory {

	Injector injector;
	
	@Inject
	public WidgetFactoryImpl(Injector injector) {
		this.injector = injector;
	}
	
	public Widget newWidget(Class<? extends Widget> clazz) {
		return injector.getInstance(clazz);
	}

}
